package cn.swpu.blog.service;

import cn.swpu.blog.entity.Category;
import cn.swpu.blog.vo.ResponseVo;

import java.util.List;
import java.util.Map;

/**
 * @Author 冰翔
 * @Date Created in 3:04 下午 2020/12/11
 */
public interface ICategoryService {

    /**
     * 根据categoryId查询对应的category
     * @param categoryId
     * @return
     */
    ResponseVo<Map<String, String>> queryCategoryById(Integer categoryId);

    /**
     * 查询所有的category
     * @return
     */
    ResponseVo<List<Category>> queryAllCategory();

    /**
     * 创建category类别
     * @param category
     * @return
     */
    ResponseVo<Map<String, Integer>> createCategory(String category);

    /**
     * 删除类别
     * @param categoryId
     * @return
     */
    ResponseVo<Category> deleteCategory(Integer categoryId);

    /**
     * 根据传入的category更新
     * @param category
     * @return
     */
    ResponseVo<Category> updateCategory(Category category);
}
